<template>
  <div class="index-container">
    <!-- <van-loading class="index-load" v-if="isLoading" type="spinner" color="#000">加载中...</van-loading> -->
    <!-- <van-circle
        class="index-load"
        v-model:current-rate="currentRate"
        :rate="rate"
        :speed="speed"
        layer-color="#ebedf0"
        :text="timer"
    /> -->
    <van-popup
        v-model:show="isShow"
        closeable
        position="bottom"
        class="index-popup"
        teleport="body"
        style="height:100%"
        @close="toLayout"
    >
    <van-cell center>
        <template class="index-title" #title>
            <span>项目介绍:</span>
        </template>
    </van-cell>
        <notify />
    </van-popup>
  </div>
</template>

<script lang="ts" setup>
import { ref,onDeactivated, computed } from 'vue'
import { useRouter } from 'vue-router'
import  Notify from './components/notify-content.vue'

Components:[Notify]

const router = useRouter()
const isLoading = ref<boolean>(true)
let time = ref<number | undefined>(0)
// let speed = ref<number>(20)
// let rate = ref<number>(100)
// let currentRate = ref<number>(0)
let timer = ref<number>(5000)
let isShow = ref<boolean>(true)


// time.value = setTimeout(() => {
//     isLoading.value = false
//     router.push("/layout")
// },timer.value)


const toLayout = () => {
    router.push("/layout")
}

onDeactivated(() => {
    // clearTimeout(time.value)
})

</script>

<style lang="scss" scoped>
    .index-container {
        height: 100%;
        // background: url("assets/images/start.png")no-repeat;
        // background-size: 100% 100%;
        // display: flex;
        // justify-content: center;
        // align-items: center;
        // .index-load {
        //     z-index:999;
        // }
        .index-title {
            padding-top: 50px;
        }
    }
</style>